package com.yj.springboottransactional.rest;

import com.yj.springboottransactional.pojo.Info;
import com.yj.springboottransactional.service.InfoService;
import com.yj.springboottransactional.service.InfoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class MyController {

    @Autowired
    private InfoService infoService;


    @GetMapping("get")
    public List<Info> getAll(){
        List<Info> all = infoService.findAll();
        return all;
    }


}
